package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class vFechadePartidos extends javax.swing.JFrame {
	private JPanel jpanFechadePartidos;
	private JScrollPane scpFechadePartidos;
	private JTable tblFechadePartidos;
	public JTable getTblFechadePartidos() {
		return tblFechadePartidos;
	}

	private JButton btnSalir;

	
	public vFechadePartidos() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("Fecha de Partidos");
			{
				jpanFechadePartidos = new JPanel();
				getContentPane().add(jpanFechadePartidos, BorderLayout.CENTER);
				jpanFechadePartidos.setPreferredSize(new java.awt.Dimension(384, 233));
				jpanFechadePartidos.setToolTipText("Fecha de Partidos");
				{
					scpFechadePartidos = new JScrollPane();
					jpanFechadePartidos.add(scpFechadePartidos);
					scpFechadePartidos.setPreferredSize(new java.awt.Dimension(383, 177));
					{
						TableModel tblFechadePartidosModel = new DefaultTableModel();
						tblFechadePartidos = new JTable();
						scpFechadePartidos.setViewportView(tblFechadePartidos);
						tblFechadePartidos.setModel(tblFechadePartidosModel);
					}
				}
				{
					btnSalir = new JButton();
					jpanFechadePartidos.add(btnSalir);
					btnSalir.setText("Salir");
					btnSalir.setPreferredSize(new java.awt.Dimension(59, 23));
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	
//-----------Accion del Boton Salir-------------------------------
	public void addActionListener(ActionListener accion)
	{
		btnSalir.addActionListener(accion);
	}
//--------------------------------------------------------------------
	
	public void setListado(AbstractTableModel modeloTabla) {
		tblFechadePartidos.setModel(modeloTabla);
	}


}
